import React from 'react'
import { Outlet, useNavigate } from 'react-router-dom'
export default function Home() {
  //
  const Navigate = useNavigate()

  const jumpMusic = () => {
    Navigate('/main/home/list/001?user=xiaoxie', {
      state: [
        {
          id:'1',
          name: '园游会',

        },
        {
          name: '龙卷风',
          id:'2'
        }
      ]
    })
  }
  const jumpNews = () => {
    Navigate('/main/home/list/002?user=xiaoxie', {
      state: [
        {
          name: '新闻',
          id:'3'
        },
      ]
    })
  }
  return (
    <div>
      <div>Home</div>
      <button onClick={jumpMusic}>Music</button>
      <button onClick={jumpNews}>News</button>
      <Outlet />
    </div>
  )
}
